package com.fangdd.logtrace;

import org.slf4j.Logger;

/**
 * Created by sulong on 16-9-6.
 */
public class BoundsLog {
    public static void callerIn(Logger logger, String nextTraceId, String interfaceName) {
        logger.info("CALLER_IN " + nextTraceId + " " + interfaceName);
    }

    public static void callerOut(Logger logger, String nextTraceId, String interfaceName, boolean success, long milliSeconds) {
        logger.info("CALLER_OUT " + nextTraceId + (success ? " S " : " F ")  + milliSeconds + " " + interfaceName);
    }

    public static void calleeIn(Logger logger, String interfaceName) {
        logger.info("CALLEE_IN " + interfaceName);
    }

    public static void calleeOut(Logger logger, String interfaceName, boolean success, long milliSeconds) {
        logger.info("CALLEE_OUT" + (success ? " S " : " F ") + milliSeconds + " " + interfaceName);
    }
}
